//引用
import Vue from 'vue'
import App from './App.vue'
import iView from 'iview';
import 'iview/dist/styles/iview.css';    
import VueRouter from 'vue-router'

import router from "./router"
import axios from 'axios'

axios.defaults.baseURL = '/api' 
Vue.use(VueRouter)
Vue.use(iView);
Vue.config.productionTip = false

// 前置路由守卫动态改变网页标题
router.beforeEach( (to,from,next) => {
	if(to.meta.title){
		document.title = to.meta.title
	}
	next()
})

new Vue({
  render: h => h(App),
  router:router
}).$mount('#app')
